package com.zxcz.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 资源对象
 */
public class Resource {
	
	private Integer id; 
	private String name; 		//资源名称
	private String ossObject;	//OSS对象
	private String version;		//资源版本号
	private Long bookCodeStart;	//oid开始码
	private Long bookCodeEnd;		//oid结束码
	private Long playCount;	//播放次数
	private Date createdAt;	//创建时间
	@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone ="GMT+08:00")
	private Date updatedAt;	//更新时间
	private Integer codeType;	//oid码类型，1-区间码，2-固定码
	private Integer onlineFlag;	//是否为在线点读内容，0-否，1-是
	private Integer userId; //内容商用户id
	private User user;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getOssObject() {
		return ossObject;
	}
	public void setOssObject(String ossObject) {
		this.ossObject = ossObject;
	}
	public String getVersion() {
		return version;
	}
	public void setVersion(String version) {
		this.version = version;
	}
	public Long getBookCodeStart() {
		return bookCodeStart;
	}
	public void setBookCodeStart(Long bookCodeStart) {
		this.bookCodeStart = bookCodeStart;
	}
	public Long getBookCodeEnd() {
		return bookCodeEnd;
	}
	public void setBookCodeEnd(Long bookCodeEnd) {
		this.bookCodeEnd = bookCodeEnd;
	}
	public Long getPlayCount() {
		return playCount;
	}
	public void setPlayCount(Long playCount) {
		this.playCount = playCount;
	}
	public Date getCreatedAt() {
		return createdAt;
	}
	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}
	public Date getUpdatedAt() {
		return updatedAt;
	}
	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}
	public Integer getCodeType() {
		return codeType;
	}
	public void setCodeType(Integer codeType) {
		this.codeType = codeType;
	}
	public Integer getOnlineFlag() {
		return onlineFlag;
	}
	public void setOnlineFlag(Integer onlineFlag) {
		this.onlineFlag = onlineFlag;
	}
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@Override
	public String toString() {
		return "Resource [id=" + id + ", name=" + name + ", ossObject=" + ossObject + ", version=" + version
				+ ", bookCodeStart=" + bookCodeStart + ", bookCodeEnd=" + bookCodeEnd + ", playCount=" + playCount
				+ ", createdAt=" + createdAt + ", updatedAt=" + updatedAt + ", codeType=" + codeType + ", onlineFlag="
				+ onlineFlag + ", userId=" + userId + ", user=" + user + "]";
	}
}
